package com.code.day19;

import java.util.LinkedHashMap;

public class Demo02LinkedHashMap {
    // 方法和HashMap一样
    public static void main(String[] args) {
        LinkedHashMap<String,String> map1 = new LinkedHashMap<>();
        map1.put("郭靖","黄蓉");
        map1.put("杨过","小龙女");
        map1.put("杨过", "郭襄");  //前者的values 会被后者顶替
        map1.put("张无忌","赵敏");
        map1.put("涛哥","三上");
        System.out.println(map1);

    }


}
